package test6;

public class Main {
    public static void main(String[] args) {
        B b = new B();
        System.out.println("=======");
        B b1 = new B();
    }
}

class A{
    int b;

    public A() {
        System.out.println("父类的构造方法");
    }

    {
        System.out.println("父类的实例代码块");
    }

    static {
        System.out.println("父类的静态代码块");
    }

    public A(int b) {
        this.b = b;
    }
}

class B extends A{
    int a;


    public B() {
        System.out.println("子类构造");
    }

    {
        System.out.println("子类的实例代码块");
    }

    static {
        System.out.println("子类的静态代码块");
    }

    public B(int a) {
        this.a = a;
    }

    public B(int b, int a) {
        super(b);
        this.a = a;
    }
}